#include <iostream>

using namespace std;

class Solution
{
public:
    int trailingZeroes(int n)
    {
        int count = 0;
        int mut = 5;
        while (n >= mut)
        {
            count += n / mut;
            mut *= 5;
        }
        return count;
    }
};

int main()
{
    Solution s;
    cout << s.trailingZeroes(30) << endl;
    return 0;
}